@import "../../theme/fancy-scrollbar.less";

.users-panel {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-flow: column nowrap;
}

.users-panel-headline {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 8px;
}

.users-panel-splitter {
    flex: 1;
}

.users-panel-headline-avatar,
.users-panel-list-avatar {
    flex-shrink: 0;
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    font-size: 0;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.users-panel-btn {
    color: var(--text);
    height: 24px;
    padding: 0 15px;
    line-height: 20px;
}

.users-panel-list-wrapper {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-flow: column nowrap;

    .fancy-scrollbar-mixin();
}

.users-panel-list {
    display: flex;
    flex-flow: column nowrap;

    thead {
        height: 40px;
        background-color: #F9F9F9;
        box-shadow: inset 0px -1px 0px #E5E8F0;
    }

    th {
        font-weight: 400;
    }

    tr {
        display: flex;
        align-items: center;
    }

    th,
    td {
        flex: 1;
        display: inline-flex;
        max-width: 133px;
        text-align: left;
        padding: 12px 0 12px 16px;
        overflow: hidden;
    }
}

.users-panel-list-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-weaker);
}

.users-panel-items {
    display: flex;
    flex-flow: column nowrap;
}

.users-panel-list-item {
    font-size: 0;
    position: relative;

    &::after {
        content: "";
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: -0.5px;
        height: 1px;
        background-color: var(--grey-1);
    }
}

.users-panel-list-avatar-name {
    flex: 1;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.users-panel-list-name-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.users-panel-list-name-content {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.users-panel-list-name-content.is-me {
    max-width: 50px;
}

.users-panel-list-name {
    display: inline-flex;
    gap: 4px;
    font-size: 14px;
    overflow: hidden;
}

.users-panel-is-self {
    flex-shrink: 0;
    color: var(--text-weak);
}

.users-panel-list-has-left {
    font-size: 12px;
    color: var(--danger);
}

.users-panel-btn-group {
    white-space: nowrap;
}

.users-panel-small-btn {
    padding: 0;

    &.is-cancel,
    &.is-hand {
        color: var(--text-weak);
    }

    .flat-icon-fill-color {
        fill: currentColor;
    }

    .flat-icon-stroke-color {
        stroke: currentColor;
    }
}

.users-panel-media-btn {
    appearance: none;
    border: none;
    padding: 0;
    background: none;
    border-radius: 50%;
    outline: none;
    overflow: hidden;
    font-size: 0;
    vertical-align: text-top;
    color: var(--danger);
    cursor: pointer;

    &:disabled {
        color: var(--text-weak);
        cursor: not-allowed;
        opacity: 0.8;
    }

    &.is-disabled {
        color: var(--danger);
    }

    &.is-mic {
        background: rgba(0, 0, 0, 0.5);

        &.is-muted {
            background: none;
        }
    }
}

.users-panel-small-btn-splitter {
    font-size: 14px;
    font-family: monospace;
    padding: 0 4px;
    color: var(--text-weak);

    &.is-disabled {
        color: var(--text-weaker);
    }
}

.users-panel-media-off {
    font-size: 14px;
    font-family: monospace;
    color: var(--text-weaker);
}

.flat-color-scheme-dark {
    .users-panel-list {
        thead {
            background-color: var(--grey-9);
            box-shadow: inset 0px -1px 0px var(--grey-8);
        }
    }

    .users-panel-list-item::after {
        background-color: var(--grey-9);
    }
}
